With this change, the various commands in Cargo now build a `CommandPrototype` instead of a `ProcessBuilder`. This `CommandPrototype` is then passed to an object that implements the `CommandsExecution` trait, which executes them.
Ideally `CommandPrototype` would look like this:
```rust
enum CommandPrototype {
Rustc {
libraries: Vec<String>,
opt_level: uint,
input: Path,
... etc... (all the options that can be passed to rustc)
},
Rustdoc {
... (all the options that can be passed to rustdoc)
},
Custom {
cmd: ...,
env: ...,
}
}
```
...but that's a bit too much work for now (maybe in a follow-up).
What this enables is using the Cargo library to intercept the build commands and tweak them. I'm planning to write `cargo-emscripten` thanks to this change.
With this, one could also imagine embedding rustc and rustdoc directly inside cargo, if that is needed.